#include "guiterm.hpp"

ScrollBarPlaceholder::ScrollBarPlaceholder(QScrollBar *scrollbar)
	:scrollbar(scrollbar)
{
	QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored);
	setSizePolicy(sizePolicy);
}

void ScrollBarPlaceholder::paintEvent(QPaintEvent *event)
{
	QRect rect = event->rect();
	QPainter painter(this);
	painter.fillRect(rect, config.backgroundColor);
}

QSize ScrollBarPlaceholder::sizeHint() const
{
	QSize scrollbarSize = scrollbar->sizeHint();
	return QSize(scrollbarSize.width(), 1);
}

